﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsFormsApplication1
{
    class columnPanel:System.Windows.Forms.Panel
    {
        int disks = 0;
        public column columnA, columnB, columnC;
        public disk[] diskArray;
        public columnPanel()
        {
            disks = 0;
        }

        public void create(int diskNumber)
        {
            disks = diskNumber;
            diskArray = new disk[disks];
            columnA = new column(this.Width*3/10,this.Height,0,0,"A");
            columnB = new column(this.Width *3/10, this.Height, this.Width *7/20, 0,"B");
            columnC = new column(this.Width*3/10, this.Height, this.Width *7/10, 0,"C");
            this.Controls.Add(columnA);
            this.Controls.Add(columnB);
            this.Controls.Add(columnC);
            int diameter = this.Width * 3 / 10;
            int x = 0;
            for (int i = 0; i < disks; i++)
            {
                diameter -= this.Width /50;
                x += this.Width /100;
                diskArray[i] = new disk(diameter, 2 + this.Height / 20, x);
                columnA.adddisk(diskArray[i]);
            }
        }
    }
}
